Skip to content

Conversation

anon189Ty
Copy link
Contributor

@anon189Ty anon189Ty commented Sep 28, 2025

What this PR does / why we need it?

Currently, MTP Model in deepseek can not be capture in ACLGraph. This PR is use to allow MTP to be captured in ACLGraph mode.

Does this PR introduce any user-facing change?

How was this patch tested?

Copy link

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This PR adds ACLGraph support for the MTP model. The changes are correct in principle, but they expose a pre-existing critical bug in the speculative decoding loop in mtp_proposer.py. The batch_descriptor and other graph-related parameters are not updated across loop iterations, which will lead to incorrect model outputs when using more than one speculative token. I've left a comment with details on the issue and a suggested fix.

@anon189Ty anon189Ty changed the title [WIP]mtp aclgraph support [Feat]mtp aclgraph support Sep 29, 2025
Comment on lines +2482 to +2489
self.drafter.dummy_run(
num_tokens=num_tokens,
with_prefill=with_prefill,
skip_attn=True,
num_reqs=num_reqs,
num_tokens_across_dp=num_tokens_across_dp)
num_tokens_across_dp=num_tokens_across_dp,
aclgraph_runtime_mode=aclgraph_runtime_mode,
batch_descriptor=batch_descriptor)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to change the signature of dummy_run in class Proposer and all of its sub-classes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants